#include <iostream>
#include "Computer.h"

Computer::Computer(SoundCard *sc, GraphicCard *gc) {
	this->sc = sc;
	this->gc = gc;
}
void Computer::work() {
	this->sc->sound();
	this->gc->display();
}
Computer::~Computer() {
	if (this->gc != NULL) {
		delete  this->gc;
		this->gc = NULL;
	}
	if (this->sc != NULL) {
		delete  this->sc;
		this->sc = NULL;
	}
}

